<?php
/** @noinspection PhpUnused */
declare(strict_types=1);

namespace app\shop\controller;

use app\shop\logic\AdvertLogic;
use think\response\Json;

/**
 * @noinspection
 * @property AdvertLogic $logic
 */
class AdvertController extends BaseController
{
    protected array $noNeedLogin = ['*'];

    public function __construct()
    {
        parent::__construct();

        $this->logic = new AdvertLogic;
    }

    /**
     * 轮播图
     * @noinspection
     * @return Json
     */
    public function banner(): Json
    {
        $result = $this->logic->bannerList();

        return $this->success($result);
    }

    /**
     * 公共栏
     * @noinspection
     * @return Json
     */
    public function noticeBar(): Json
    {
        $result = $this->logic->noticeBarList();

        return $this->success($result);
    }

    /**
     * 热门推荐
     * @return Json
     */
    public function hotRecommend(): Json
    {
        $result = $this->logic->hotRecommendList();

        return $this->success($result);
    }
}